package cn.cloudplug.instar_ec.main.tool;

import android.graphics.Bitmap;
import android.os.Bundle;
import android.support.v7.widget.AppCompatImageView;
import android.view.View;

import butterknife.BindView;
import butterknife.OnClick;
import cn.cloudplug.core.delegate.ScentDelegate;
import cn.cloudplug.core.util.MyUtil;
import cn.cloudplug.instar_ec.R;
import cn.cloudplug.instar_ec.R2;

/**
 * Created by pc on 2018/2/8.
 */

public class ToolDelegate extends ScentDelegate {

    @BindView(R2.id.iv_bg)
    AppCompatImageView iv_bg;


    @OnClick({ R2.id.iv_notepad, R2.id.iv_alarm, R2.id.iv_compass, R2.id.iv_timer, R2.id.iv_calculator, R2.id.iv_record, R2.id.iv_flashlight, R2.id.iv_speed_up, R2.id.iv_album})
    public void sayHi(View v ) {
        getSupportDelegate().pop();
        int id=v.getId();
            if(id==R.id.iv_notepad){

            }else if (id == R.id.iv_alarm){

            }else if (id == R.id.iv_compass){

            }else if (id == R.id.iv_timer){

            }else if (id == R.id.iv_calculator){

            }else if (id == R.id.iv_record){

            }else if (id == R.id.iv_flashlight){

            }else if (id == R.id.iv_speed_up){

            }else if (id == R.id.iv_album){

            }else if (id == R.id.iv_alarm){

            }
    }
    @Override
    protected Object setContent() {
        return R.layout.delegate_tool;
    }

    @Override
    protected void onBindView(Bundle savedInstanceState, View view) {
        Bitmap bitmap = MyUtil.loadBitmapFromViewBySystem(getSupportDelegate().getActivity().getWindow().getDecorView());
        MyUtil.blur(bitmap,iv_bg,25);
    }
}
